package com.shop.cereshop.business.service.wallet.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.shop.cereshop.business.dao.wallet.CereShopWalletTransactionDAO;
import com.shop.cereshop.commons.domain.wallet.CereShopWalletTransaction;
import com.shop.cereshop.business.service.wallet.CereShopWalletTransactionService;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 业务实现类
 * 店铺钱包流水表
 * </p>
 *
 * @author
 */
@Slf4j
@Service
public class CereShopWalletTransactionServiceImpl extends
    ServiceImpl<CereShopWalletTransactionDAO, CereShopWalletTransaction> implements CereShopWalletTransactionService {

    @Resource
    private CereShopWalletTransactionDAO cereShopWalletTransactionDAO;

    @Override
    public List<CereShopWalletTransaction> getIncomeList(Integer page, Integer pageSize, Long shopId) {
        //创建分页参数
        PageHelper.startPage(page, pageSize);

        //根据店铺id查询收入记录
        return cereShopWalletTransactionDAO.getIncomeList(shopId);
    }
}
